<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>科普列表</a></li>
        <li><a href="{:url('health/Add')}">{:lang('ADD')}</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('health/index')}">
        
        关键字：
        <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
               placeholder="标题">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('health/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form" action="{:url('health/listOrder')}">
        <div class="table-actions">
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th width="8%">{:lang('SORT')}</th>
                <th width="10%">ID</th>
                <th width="20%">标题</th>
                <th width="20%">封面</th>
                <th width="20%">发布时间</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>
                        <input type="text" name="sort[{$vo.id}]" value="{$vo.sort}" class="input input-order">
                    </td>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>
                        <img src="{:cmf_get_image_preview_url($vo.image)}" id="thumb-preview" width="40" style="cursor: hand"/>
                    </td>
                    <td>{:date('Y-m-d H:i:s',$vo.addtime)}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('health/edit',['id'=>$vo['id']])}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" class="" href="{:url('health/delete',['id'=>$vo['id']])}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        
        <div class="table-actions">
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
        </div>
        <div class="pagination">{$page|default=''}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>